package org.lb.MarketingSystem.controller;

import org.lb.MarketingSystem.entity.CustomerUser;
import org.lb.MarketingSystem.service.CustomerUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestMapping;

@Controller
@RequestMapping()
public class MarketingUserInfoController {
	@Autowired
	private CustomerUserService customerService;
	@RequestMapping(value="/userInfo")
	public String customerCheckLogin(Model model){
     String []name=MartetingCustomerController.UserName.split("，");
     CustomerUser customerUser=customerService.getCustomerUserByName(name[1]);
     model.addAttribute("customerU", customerUser);
		return "userInfo";
	}

	@RequestMapping(value="/userInsertInfo")
	public String Inscustomer(Model model){
		 CustomerUser customerUser=customerService.getCustomerUserByName(MartetingCustomerController.reGcustomerUser.getName());
		 model.addAttribute("customerU", customerUser);
		return "userInfo";
	}
}
